#include "Date.h"

DateIntervalBuilder::DateIntervalBuilder() : 
	year(::NULL_VALUE),
	month(::NULL_VALUE),
	day(::NULL_VALUE),
	hour(::NULL_VALUE),
	minute(::NULL_VALUE),
	second(::NULL_VALUE)
{
};
	
DateIntervalBuilder& DateIntervalBuilder::setYear(int year)
{
	this->year = year;
	return *this;
}
	
DateIntervalBuilder& DateIntervalBuilder::setMonth(int month)
{
	this->month = month;
	return *this;
}

DateIntervalBuilder& DateIntervalBuilder::setDay(int day)
{
	this->day = day;
	return *this;
}

DateIntervalBuilder& DateIntervalBuilder::setHour(int hour)
{
	this->hour = hour;
	return *this;
}

DateIntervalBuilder& DateIntervalBuilder::setMinute(int minute)
{
	this->minute = minute;
	return *this;
}

DateIntervalBuilder& DateIntervalBuilder::setSecond(int second)
{
	this->second = second;
	return *this;
}

DateInterval DateIntervalBuilder::build() const
{
	return DateInterval(year, month, day, hour, minute, second);
}